var express = require('express');
var router = express.Router();

const { signup, list, deleteData, updateData, loginData, exitData, isAuth } = require("../controller/users.js");
const { auth } = require("../middlewares/auth.js");
/* GET users listing. */
//配置路由--前台调用的接口
router.post('/', auth, signup);
router.get("/", auth, list);
router.delete("/", auth, deleteData);
router.put("/", auth, updateData);
router.post("/login", loginData);
router.get("/exit", auth, exitData);
router.get("/isAuth", isAuth);

module.exports = router;